***************************************************************************************
***************************************************************************************
*************************INITIAL COMMENTS**********************************************
***************************************************************************************
***************************************************************************************	

*This Stata do-file contains replication materials for Castle and Stepp "Partisanship, Religion, and Issue Polarization: A Reassessment"
*Stata/SE 14.2 was used for all analyses
*Note: We have deleted respondent's personal information and any unused variables for the sake of parsimony. 
*Please contact jeremycastle15@gmail.com with questions or concerns.

***************************************************************************************
***************************************************************************************
*************************STEP 1: RECODES***********************************************
***************************************************************************************
***************************************************************************************	
/*
*Note: We show the recodes for transparency, but we have retained them in the dataset, so running this is not necessary to replicate the analysis.
*Those who simply want to replicate the analysis can jump to Step 3

set maxvar 10000
use "/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB Replication.dta"

recode Q1 (1=0) (2=1) (3=.) (4=.) (5=.), gen(female01)
gen educ01= (Q2-1)/5
recode Q145 (1=0) (2=0) (3=1) (4=0) (5=0) (6=0), gen(hispanic01)
recode Q145 (1=0) (2=1) (3=0) (4=0) (5=0) (6=0), gen(black01)
recode Q145 (1=0) (2=0) (3=0) (4=1) (5=1) (6=1), gen(raceother01)
gen income01 = (Q11-1)/8
gen age01 = (Q5-1)/3
recode Q108 (6=0) (5=1) (4=2) (3=3) (2=4) (1=5), gen(chatt)
gen chatt01= (chatt/5)
gen relguide= (Q109 - 1)
gen relguide01= (relguide/3)
recode Q110 (7=0) (6=1) (5=2) (4=3) (3=4) (2=5) (1=6), gen(pray)
gen pray01= (pray/6)
factor chatt01 relguide01 pray01, pcf
alpha chatt01 relguide01 pray01
egen relcommit01 = rowmean(chatt01 relguide01 pray01)
gen relcommit4=.
replace relcommit4=0 if relcommit01>-0.1 & relcommit01<.29
replace relcommit4=1 if relcommit01>.29 & relcommit01<.551
replace relcommit4=2 if relcommit01>.551 & relcommit01<.756
replace relcommit4=3 if relcommit01>.756 & relcommit01<1.01
label define rc4lab 0 "Lowest" 1 "Med. Low" 2 "Med. High" 3 "Highest"
label values relcommit4 rc4lab
gen ideology= (Q8 -1)
gen ideo01 = (ideology/4)
gen party= (Q7 - 1)
gen party01= (party/6)
*we're going to create reltrad via 1=evang 2=ml 3=bp 4=catholic 5=other 6=none
recode Q113 (1=7) (2=4) (3=7) (4=5) (5=5) (6=5) (7=5) (8=5) (9=5) (10=6), gen(reltrad6)
*sorting protestants into their places
replace reltrad6=3 if reltrad6==7 & black01==1 /*black protestants*/
replace reltrad6=1 if reltrad6==7 & Q112==1 /*creating evangelicals*/
replace reltrad6=2 if reltrad6==7
label define rel6lab 1 "evangelical" 2 "mainline" 3 "black prot" 4 "catholic" 5 "other" 6 "none"
label values reltrad6 rel6lab
recode reltrad6 (5=.) (6=5), gen(reltrad5)
label define rel5lab 1 "evangelical" 2 "mainline" 3 "black prot" 4 "catholic" 5 "none"
label values reltrad5 rel5lab
gen evang=0 
replace evang=1 if reltrad5==1
gen mainline=0
replace mainline=1 if reltrad5==2
gen blackprot=0
replace blackprot=1 if reltrad5==3
gen catholic=0
replace catholic=1 if reltrad5==4
gen none=0
replace none=1 if reltrad6==5

recode Q182 (4=0) (3=1) (2=2) (1=3), gen(abort_lib)
recode Q183 (4=0) (3=1) (2=2) (1=3), gen(abort_cons)

recode Q185 (4=0) (3=1) (2=2) (1=3), gen(gaymarry_cons)
recode Q184 (4=0) (3=1) (2=2) (1=3), gen(gaymarry_lib)

recode Q187 (4=0) (3=1) (2=2) (1=3), gen(intel_cons)
recode Q186 (4=0) (3=1) (2=2) (1=3), gen(intel_lib)

recode Q189 (4=0) (3=1) (2=2) (1=3), gen(tencomm_cons)
recode Q188 (4=0) (3=1) (2=2) (1=3), gen(tencomm_lib)

recode Q191 (4=0) (3=1) (2=2) (1=3), gen(transbr_cons)
recode Q190 (4=0) (3=1) (2=2) (1=3), gen(transbr_lib)

recode Q193 (4=0) (3=1) (2=2) (1=3), gen(welfare_cons)
recode Q192 (4=0) (3=1) (2=2) (1=3), gen(welfare_lib)

recode Q195 (4=0) (3=1) (2=2) (1=3), gen(enviro_cons)
recode Q194 (4=0) (3=1) (2=2) (1=3), gen(enviro_lib)

recode Q197 (4=0) (3=1) (2=2) (1=3), gen(immig_cons)
recode Q196 (4=0) (3=1) (2=2) (1=3), gen(immig_lib)

recode Q199 (4=0) (3=1) (2=2) (1=3), gen(health_cons)
recode Q198 (4=0) (3=1) (2=2) (1=3), gen(health_lib)

recode Q201 (4=0) (3=1) (2=2) (1=3), gen(military_cons)
recode Q200 (4=0) (3=1) (2=2) (1=3), gen(military_lib)

gen abort_polar = abort_cons - abort_lib
gen gaymarry_polar = gaymarry_cons - gaymarry_lib
gen intel_polar = intel_cons - intel_lib
gen tencomm_polar = tencomm_cons - tencomm_lib
gen transbr_polar = transbr_cons - transbr_lib
gen welfare_polar = welfare_cons - welfare_lib
gen enviro_polar = enviro_cons - enviro_lib
gen immig_polar = immig_cons - immig_lib
gen health_polar = health_cons - health_lib
gen military_polar = military_cons - military_lib

***************************************************************************************
***************************************************************************************
***********************STEP 2: GENERATING WEIGHTS**************************************
***************************************************************************************
***************************************************************************************

*Creating the Weights
recode Q2 (1=1) (2=2) (3=3) (4=3) (5=4) (6=5), gen(educ5weight)
recode Q145 (1=1) (2=2) (3=3) (4=4) (5=5) (6=5), gen(race5weight)
recode Q7 (1=1) (2=1) (3=2) (4=2) (5=2) (6=3) (7=3), gen(pid3weight)
recode Q8 (1=1) (2=1) (3=2) (4=3) (5=3), gen(ideo3weight)
recode Q10 (1=1) (2=1) (3=2) (4=2) (5=2), gen(votereg)
ipfweight female01 educ5weight race5weight pid3weight ideo3weight Q112 votereg, gen(weight2) val(48 52 13 28 31 18 10 65 12 16 6 3 22 46 32 27 38 32 29 71 65 32 ) maxit(100)

*At this point in the process I ran this command to reduce the clutter in the dataset by getting rid of variables not needed for the replication
keep abort_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 reltrad5 relcommit01 Q1 ///
female01 Q2 educ01 Q145 Q11 income01 Q5 age01 Q108 chatt chatt01 Q109 relguide relguide01 Q110 pray pray01 ///
relcommit01 Q8 ideology ideo01 Q7 party party01 Q113 ///
reltrad6 Q112 reltrad5 evang mainline blackprot catholic none /// 
Q182 Q183 Q185 Q184 Q187 Q186 Q189 Q188 Q191 Q190 Q193 Q192 Q195 Q194 Q197 Q196 Q199 Q198 Q201 Q200 ///
abort_lib abort_cons gaymarry_cons gaymarry_lib intel_cons intel_lib tencomm_cons tencomm_lib transbr_cons transbr_lib ///
welfare_cons welfare_lib enviro_cons enviro_lib immig_cons immig_lib health_cons health_lib military_cons military_lib ///
abort_polar gaymarry_polar intel_polar tencomm_polar transbr_polar welfare_polar enviro_polar immig_polar health_polar military_polar ///
Q2 educ5weight Q145 race5weight Q7 pid3weight Q8 ideo3weight Q10 votereg weight2
*/

***************************************************************************************
***************************************************************************************
******************STEP 3: MAKING MINI DATASETS*****************************************
***************************************************************************************
***************************************************************************************	

*We use several mini-datasets to make data visualizations in the paper. In this step, we show how we assembled those mini-datasets.

*Mini Datasets for Figures 4 and 5
use "/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB Replication/Castle Stepp PB Replication.dta"
svyset [pweight= weight2] 

svy: reg abort_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(relcommit01==(0(1)1) reltrad5==(1(1)5)) level(85)

svy: reg gaymarry_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(relcommit01==(0(1)1) reltrad5==(1(1)5)) level(85)

svy: reg intel_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(relcommit01==(0(1)1) reltrad5==(1(1)5)) level(85)

svy: reg tencomm_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(relcommit01==(0(1)1) reltrad5==(1(1)5)) level(85)

svy: reg transbr_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(relcommit01==(0(1)1) reltrad5==(1(1)5)) level(85)

svy: reg welfare_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(relcommit01==(0(1)1) reltrad5==(1(1)5)) level(85)

svy: reg enviro_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(relcommit01==(0(1)1) reltrad5==(1(1)5)) level(85)

svy: reg immig_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(relcommit01==(0(1)1) reltrad5==(1(1)5)) level(85)

svy: reg health_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(relcommit01==(0(1)1) reltrad5==(1(1)5)) level(85)

svy: reg military_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(relcommit01==(0(1)1) reltrad5==(1(1)5)) level(85)
*The results from above were copied and pasted into Excel, formatted, and pasted into Stata to create the mini-dataset:
*"/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB 2021 Figs 4 and 5 mini dataset.dta"

*Mini-dataset for Appendix Figures D1 and D2
use "/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB Replication/Castle Stepp PB Replication.dta"
*label define pidlab7 0 "Str. Dem." 1 "Dem." 2 "Ind. Dem." 3 "Ind." 4 "Ind. Rep." 5 "Rep." 6 "Str. Rep"
*label values party pidlab7

svy: mean abort_polar, over(party)
svy: mean gaymarry_polar, over(party)
svy: mean intel_polar, over(party)
svy: mean tencomm_polar, over(party)
svy: mean transbr_polar, over(party)
svy: mean welfare_polar, over(party)
svy: mean enviro_polar, over(party)
svy: mean immig_polar, over(party)
svy: mean health_polar, over(party)
svy: mean military_polar, over(party)
*The results from above were copied and pasted into Excel, formatted, and pasted into Stata to create the mini-dataset:
*"/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB 2021 Appendix D1 D2 mini dataset.dta"

*Mini-dataset for Appendix Figures D3 and D4
use "/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB Replication/Castle Stepp PB Replication.dta"
svy: mean abort_polar, over(reltrad5)
svy: mean gaymarry_polar, over(reltrad5)
svy: mean intel_polar, over(reltrad5)
svy: mean tencomm_polar, over(reltrad5)
svy: mean transbr_polar, over(reltrad5)
svy: mean welfare_polar, over(reltrad5)
svy: mean enviro_polar, over(reltrad5)
svy: mean immig_polar, over(reltrad5)
svy: mean health_polar, over(reltrad5)
svy: mean military_polar, over(reltrad5)
*The results from above were copied and pasted into Excel, formatted, and pasted into Stata to create the mini-dataset:
*"/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB 2021 Appendix D3 D4 mini dataset.dta"

*Mini-dataset for Appendix Figures D5 and D6
use "/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB Replication/Castle Stepp PB Replication.dta"
*label define commitlab 0 "Lowest" 1 "Med. Low" 2 "Med. High" 3 "Highest"
*label values relcommit commitlab

svy: mean abort_polar, over(relcommit4)
svy: mean gaymarry_polar, over(relcommit4)
svy: mean intel_polar, over(relcommit4)
svy: mean tencomm_polar, over(relcommit4)
svy: mean transbr_polar, over(relcommit4)
svy: mean welfare_polar, over(relcommit4)
svy: mean enviro_polar, over(relcommit4)
svy: mean immig_polar, over(relcommit4)
svy: mean health_polar, over(relcommit4)
svy: mean military_polar, over(relcommit4)

*The results from above were copied and pasted into Excel, formatted, and pasted into Stata to create the mini-dataset:
*"/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB 2021 Appendix D5 D6 mini dataset.dta"

***************************************************************************************
***************************************************************************************
***********************STEP 3: MAIN ANALYSIS*******************************************
***************************************************************************************
***************************************************************************************	

*Here, we break the analysis down by table

*Table 1 is just question wording

*Table 2 is just more question wording

***************************************************************************************
**************************TABLE 3: REGRESSION PT 1*************************************
***************************************************************************************
use "/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB Replication/Castle Stepp PB Replication.dta"
svyset [pweight= weight2] 

eststo abort: reg abort_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01 [pweight= weight2]
eststo gaymarry: reg gaymarry_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01 [pweight= weight2]
eststo intel: reg intel_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01 [pweight= weight2]
eststo tencomm: reg tencomm_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01 [pweight= weight2]
eststo transbr: reg transbr_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01 [pweight= weight2]
esttab abort gaymarry intel tencomm transbr, replace b(%10.3f) r2 ar2 pr2 se nogaps

***************************************************************************************
**************************TABLE 3: REGRESSION PT 2*************************************
***************************************************************************************
use "/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB Replication/Castle Stepp PB Replication.dta"
svyset [pweight= weight2] 

eststo welfare: reg welfare_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01 [pweight= weight2]
eststo enviro: reg enviro_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01 [pweight= weight2]
eststo immig: reg immig_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01 [pweight= weight2]
eststo health: reg health_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01 [pweight= weight2]
eststo military: reg military_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01 [pweight= weight2]
esttab welfare enviro immig health military, replace b(%10.3f) r2 ar2 pr2 se nogaps

***************************************************************************************
******************************FIGURE 1: HISTOGRAMS*************************************
***************************************************************************************
use "/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB Replication/Castle Stepp PB Replication.dta"
svyset [pweight= weight2] 

twoway histogram abort_polar, percent discrete scheme(s1mono) title("Abortion") xtitle("<-Most Liberal     Most Conservative->") name(fig1a)
twoway histogram gaymarry_polar, percent discrete scheme(s1mono) title("Same-Sex Marriage") xtitle("<-Most Liberal     Most Conservative->") name(fig1b)
twoway histogram intel_polar, percent discrete scheme(s1mono) title("Intelligent Design") xtitle("<-Most Liberal     Most Conservative->") name(fig1c)
twoway histogram tencomm_polar, percent discrete scheme(s1mono) title("Ten Commandments") xtitle("<-Most Liberal     Most Conservative->") name(fig1d)
twoway histogram transbr_polar, percent discrete scheme(s1mono) title("Anti-Trans. Bathroom Bills") xtitle("<-Most Liberal     Most Conservative->") name(fig1e)
twoway histogram welfare_polar, percent discrete scheme(s1mono) title("Welfare") xtitle("<-Most Liberal     Most Conservative->") name(fig1f)
twoway histogram enviro_polar, percent discrete scheme(s1mono) title("Environment") xtitle("<-Most Liberal     Most Conservative->") name(fig1g)
twoway histogram immig_polar, percent discrete scheme(s1mono) title("Immigration") xtitle("<-Most Liberal     Most Conservative->") name(fig1h)
twoway histogram health_polar, percent discrete scheme(s1mono) title("Healthcare") xtitle("<-Most Liberal     Most Conservative->") name(fig1i)
twoway histogram military_polar, percent discrete scheme(s1mono) title("Military Size") xtitle("<-Most Liberal     Most Conservative->") name(fig1j)
graph combine fig1a fig1b fig1c fig1d fig1e fig1f fig1g fig1h fig1i fig1j, ycommon
*Note: We used Stata's Graph Editor Function to make this more visually appealing. Given that these edits were done by hand, we cannot include them in this replication.

***************************************************************************************
******************************FIGURE 2: Party's Impact on Issue Polarization***********
*************************************************************************************** 
use "/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB Replication/Castle Stepp PB Replication.dta"
svyset [pweight= weight2] 

svy: reg abort_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(party01==(0(.1)1)) level(85)
marginsplot, name(party1) plotopts(mcolor(black)) ciopts(lcolor(black))  scheme(s1mono) title("Abortion") xtitle("<-More Democratic   More Republican-> ")  ytitle("<-Liberal               Conservative->") ylabel (, grid) legend(off)

svy: reg gaymarry_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(party01==(0(.1)1)) level(85)
marginsplot, name(party2) plotopts(mcolor(black)) ciopts(lcolor(black))  scheme(s1mono) title("Same-sex Marriage") xtitle("<-More Democratic   More Republican-> ")  ytitle("<-Liberal               Conservative->") ylabel (, grid) legend(off)

svy: reg intel_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(party01==(0(.1)1)) level(85)
marginsplot, name(party3) plotopts(mcolor(black)) ciopts(lcolor(black))  scheme(s1mono) title("Intelligent Design") xtitle("<-More Democratic   More Republican-> ")  ytitle("<-Liberal               Conservative->") ylabel (, grid) legend(off)

svy: reg tencomm_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(party01==(0(.1)1)) level(85)
marginsplot, name(party4) plotopts(mcolor(black)) ciopts(lcolor(black))  scheme(s1mono) title("Ten Commandments") xtitle("<-More Democratic   More Republican-> ")  ytitle("<-Liberal               Conservative->") ylabel (, grid) legend(off)

svy: reg transbr_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(party01==(0(.1)1)) level(85)
marginsplot, name(party5) plotopts(mcolor(black)) ciopts(lcolor(black))  scheme(s1mono) title("Anti-trans. Bathroom Bills") xtitle("<-More Democratic   More Republican-> ")  ytitle("<-Liberal               Conservative->") ylabel (, grid) legend(off)

svy: reg welfare_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(party01==(0(.1)1)) level(85)
marginsplot, name(party6) plotopts(mcolor(black)) ciopts(lcolor(black))  scheme(s1mono) title("Welfare") xtitle("<-More Democratic   More Republican-> ")  ytitle("<-Liberal               Conservative->") ylabel (, grid) legend(off)

svy: reg enviro_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(party01==(0(.1)1)) level(85)
marginsplot, name(party7) plotopts(mcolor(black)) ciopts(lcolor(black))  scheme(s1mono) title("Environment") xtitle("<-More Democratic   More Republican-> ")  ytitle("<-Liberal               Conservative->") ylabel (, grid) legend(off)

svy: reg immig_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(party01==(0(.1)1)) level(85)
marginsplot, name(party8) plotopts(mcolor(black)) ciopts(lcolor(black))  scheme(s1mono) title("Immigration") xtitle("<-More Democratic   More Republican-> ")  ytitle("<-Liberal               Conservative->") ylabel (, grid) legend(off)

svy: reg health_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(party01==(0(.1)1)) level(85)
marginsplot, name(party9) plotopts(mcolor(black)) ciopts(lcolor(black))  scheme(s1mono) title("Healthcare") xtitle("<-More Democratic   More Republican-> ")  ytitle("<-Liberal               Conservative->") ylabel (, grid) legend(off)

svy: reg military_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(party01==(0(.1)1)) level(85)
marginsplot, name(party10) plotopts(mcolor(black)) ciopts(lcolor(black))  scheme(s1mono) title("Military Size") xtitle("<-More Democratic   More Republican-> ")  ytitle("<-Liberal               Conservative->") ylabel (, grid) legend(off)

graph combine party1 party2 party3 party4 party5 party6 party7 party8 party9 party10, ycommon
*Note: We used Stata's Graph Editor Function to make this more visually appealing. Given that these edits were done by hand, we cannot include them in this replication.

***************************************************************************************
****************FIGURE 3: Religious Tradition's Impact on Issue Polarization***********
*************************************************************************************** 
use "/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB Replication/Castle Stepp PB Replication.dta"
svyset [pweight= weight2] 

*We used this procedure to determine how to fix attendance for each tradition.
svy: mean relcommit01, over(reltrad5)

svy: reg abort_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(reltrad5==1 relcommit01==.7119772) at(reltrad5==2 relcommit01==.488975) at(reltrad5==3 relcommit01==.6008227) at(reltrad5==4 relcommit01==.5580423) at(reltrad5==5 relcommit01==.0947898) level(85)
marginsplot, name(reltrad1) recast(scatter) plotopts(mcolor(black)) ciopts(lcolor(black))  scheme(s1mono) title("Abortion")  xlabel(1 "Evang." 2 "Mainline" 3 "Black Prot." 4 "Catholic" 5 "None") ytitle("<-Liberal               Conservative->") ylabel (, grid) 

svy: reg gaymarry_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(reltrad5==1 relcommit01==.7119772) at(reltrad5==2 relcommit01==.488975) at(reltrad5==3 relcommit01==.6008227) at(reltrad5==4 relcommit01==.5580423) at(reltrad5==5 relcommit01==.0947898) level(85)
marginsplot, name(reltrad2) recast(scatter) plotopts(mcolor(black)) ciopts(lcolor(black))  scheme(s1mono) title("Same-sex Marriage") xlabel(1 "Evang." 2 "Mainline" 3 "Black Prot." 4 "Catholic" 5 "None") ytitle("<-Liberal               Conservative->") ylabel (, grid) 

reg intel_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(reltrad5==1 relcommit01==.7119772) at(reltrad5==2 relcommit01==.488975) at(reltrad5==3 relcommit01==.6008227) at(reltrad5==4 relcommit01==.5580423) at(reltrad5==5 relcommit01==.0947898) level(85)
marginsplot, name(reltrad3) recast(scatter) plotopts(mcolor(black)) ciopts(lcolor(black))  scheme(s1mono) title("Intelligent Design") xlabel(1 "Evang." 2 "Mainline" 3 "Black Prot." 4 "Catholic" 5 "None") ytitle("<-Liberal               Conservative->") ylabel (, grid) 

reg tencomm_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(reltrad5==1 relcommit01==.7119772) at(reltrad5==2 relcommit01==.488975) at(reltrad5==3 relcommit01==.6008227) at(reltrad5==4 relcommit01==.5580423) at(reltrad5==5 relcommit01==.0947898) level(85)
marginsplot, name(reltrad4) recast(scatter) plotopts(mcolor(black)) ciopts(lcolor(black))  scheme(s1mono) title("Ten Commandments") xlabel(1 "Evang." 2 "Mainline" 3 "Black Prot." 4 "Catholic" 5 "None") ytitle("<-Liberal               Conservative->") ylabel (, grid) 

reg transbr_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(reltrad5==1 relcommit01==.7119772) at(reltrad5==2 relcommit01==.488975) at(reltrad5==3 relcommit01==.6008227) at(reltrad5==4 relcommit01==.5580423) at(reltrad5==5 relcommit01==.0947898) level(85)
marginsplot, name(reltrad5) recast(scatter) plotopts(mcolor(black)) ciopts(lcolor(black))  scheme(s1mono) title("Anti-trans. Bathroom Bills")  xlabel(1 "Evang." 2 "Mainline" 3 "Black Prot." 4 "Catholic" 5 "None") ytitle("<-Liberal               Conservative->") ylabel (, grid) 

reg welfare_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(reltrad5==1 relcommit01==.7119772) at(reltrad5==2 relcommit01==.488975) at(reltrad5==3 relcommit01==.6008227) at(reltrad5==4 relcommit01==.5580423) at(reltrad5==5 relcommit01==.0947898) level(85)
marginsplot, name(reltrad6) recast(scatter) plotopts(mcolor(black)) ciopts(lcolor(black))  scheme(s1mono) title("Welfare")  xlabel(1 "Evang." 2 "Mainline" 3 "Black Prot." 4 "Catholic" 5 "None") ytitle("<-Liberal               Conservative->") ylabel (, grid) 

reg enviro_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(reltrad5==1 relcommit01==.7119772) at(reltrad5==2 relcommit01==.488975) at(reltrad5==3 relcommit01==.6008227) at(reltrad5==4 relcommit01==.5580423) at(reltrad5==5 relcommit01==.0947898) level(85)
marginsplot, name(reltrad7) recast(scatter) plotopts(mcolor(black)) ciopts(lcolor(black))  scheme(s1mono) title("Environment")  xlabel(1 "Evang." 2 "Mainline" 3 "Black Prot." 4 "Catholic" 5 "None") ytitle("<-Liberal               Conservative->") ylabel (, grid) 

reg immig_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(reltrad5==1 relcommit01==.7119772) at(reltrad5==2 relcommit01==.488975) at(reltrad5==3 relcommit01==.6008227) at(reltrad5==4 relcommit01==.5580423) at(reltrad5==5 relcommit01==.0947898) level(85)
marginsplot, name(reltrad8) recast(scatter) plotopts(mcolor(black)) ciopts(lcolor(black))  scheme(s1mono) title("Immigration")  xlabel(1 "Evang." 2 "Mainline" 3 "Black Prot." 4 "Catholic" 5 "None") ytitle("<-Liberal               Conservative->") ylabel (, grid) 

reg health_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(reltrad5==1 relcommit01==.7119772) at(reltrad5==2 relcommit01==.488975) at(reltrad5==3 relcommit01==.6008227) at(reltrad5==4 relcommit01==.5580423) at(reltrad5==5 relcommit01==.0947898) level(85)
marginsplot, name(reltrad9) recast(scatter) plotopts(mcolor(black)) ciopts(lcolor(black))  scheme(s1mono) title("Healthcare")  xlabel(1 "Evang." 2 "Mainline" 3 "Black Prot." 4 "Catholic" 5 "None") ytitle("<-Liberal               Conservative->") ylabel (, grid) 

reg military_polar party01 ideo01 age01 educ01 income01 female01 hispanic01 raceother01 i.reltrad5 relcommit01 i.reltrad5#c.relcommit01
margins, at(reltrad5==1 relcommit01==.7119772) at(reltrad5==2 relcommit01==.488975) at(reltrad5==3 relcommit01==.6008227) at(reltrad5==4 relcommit01==.5580423) at(reltrad5==5 relcommit01==.0947898) level(85)
marginsplot, name(reltrad10) recast(scatter) plotopts(mcolor(black)) ciopts(lcolor(black))  scheme(s1mono) title("Military Size")  xlabel(1 "Evang." 2 "Mainline" 3 "Black Prot." 4 "Catholic" 5 "None") ytitle("<-Liberal               Conservative->") ylabel (, grid) 

graph combine reltrad1 reltrad2 reltrad3 reltrad4 reltrad5 reltrad6 reltrad7 reltrad8 reltrad9 reltrad10, ycommon
*Note: We used Stata's Graph Editor Function to make this more visually appealing. Given that these edits were done by hand, we cannot include them in this replication.

***************************************************************************************
***************FIGURE 4: Religious Commitment's Impact on Cultural Issues**************
*************************************************************************************** 
*The dot plots in Figures 4 and 5 use a mini-dataset created above.
use "/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB Replication/Castle Stepp PB 2021 Figs 4 and 5 mini dataset.dta"

*label define rel5lab5 1 "Unaffiliated" 2 "Catholic" 3 "Black Prot." 4 "Mainline" 5 "Evangelical"
*label values reltrad rel5lab5

twoway (dot abort_locommit abort_hicommit reltrad, horizontal) (rcap abortlo_lb abortlo_ub reltrad, horizontal) (rcap aborthi_lb aborthi_ub reltrad, horizontal), scheme(s1mono) title("Abortion") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(Fig4a)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot gaymarry_locommit gaymarry_hicommit reltrad, horizontal) (rcap gaymarrylo_lb gaymarrylo_ub reltrad, horizontal) (rcap gaymarryhi_lb gaymarryhi_ub reltrad, horizontal), scheme(s1mono) title("Same-sex Marriage") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(Fig4b)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot intel_locommit intel_hicommit reltrad, horizontal) (rcap intello_lb intello_ub reltrad, horizontal) (rcap intelhi_lb intelhi_ub reltrad, horizontal), scheme(s1mono) title("Intelligent Design") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(Fig4c)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot tencomm_locommit tencomm_hicommit reltrad, horizontal) (rcap tencommlo_lb tencommlo_ub reltrad, horizontal) (rcap tencommhi_lb tencommhi_ub reltrad, horizontal), scheme(s1mono) title("Ten Commandments") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(Fig4d)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot trans_locommit trans_hicommit reltrad, horizontal) (rcap translo_lb translo_ub reltrad, horizontal) (rcap transhi_lb transhi_ub reltrad, horizontal), scheme(s1mono) title("Anti-Trans. Bathroom Bills") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(Fig4e)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

*This command combines the plots into Figure 4
graph combine Fig4a Fig4b Fig4c Fig4d Fig4e, ycommon

***************************************************************************************
***************FIGURE 5: Religious Commitment's Impact on Non-cultural Issues**********
*************************************************************************************** 
*The dot plots in Figures 4 and 5 use a mini-dataset created above.
use "/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB Replication/Castle Stepp PB 2021 Figs 4 and 5 mini dataset.dta"

twoway (dot welfare_locommit welfare_hicommit reltrad, horizontal) (rcap welfarelo_lb welfarelo_ub reltrad, horizontal) (rcap welfarehi_lb welfarehi_ub reltrad, horizontal), scheme(s1mono) title("Welfare") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(Fig5a)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot enviro_locommit enviro_hicommit reltrad, horizontal) (rcap envirolo_lb envirolo_ub reltrad, horizontal) (rcap envirohi_lb envirohi_ub reltrad, horizontal), scheme(s1mono) title("Environment") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(Fig5b)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot immig_locommit immig_hicommit reltrad, horizontal) (rcap immiglo_lb immiglo_ub reltrad, horizontal) (rcap immighi_lb immighi_ub reltrad, horizontal), scheme(s1mono) title("Immigration") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(Fig5c)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot health_locommit health_hicommit reltrad, horizontal) (rcap healthlo_lb healthlo_ub reltrad, horizontal) (rcap healthhi_lb healthhi_ub reltrad, horizontal), scheme(s1mono) title("Healthcare") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(Fig5d)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot military_locommit military_hicommit reltrad, horizontal) (rcap militarylo_lb militarylo_ub reltrad, horizontal) (rcap militaryhi_lb militaryhi_ub reltrad, horizontal), scheme(s1mono) title("Military Size") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(Fig5e)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

*This command combines the plots into Figure 5
graph combine Fig5a Fig5b Fig5c Fig5d Fig5e, ycommon


***************************************************************************************
***************************************************************************************
***********************STEP 4: MINOR ANALYSES IN FOOTNOTES*****************************
***************************************************************************************
***************************************************************************************	

use "/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB Replication/Castle Stepp PB Replication.dta"
svyset [pweight= weight2] 

*Footnote 4: Details on religious commitment
factor chatt01 relguide01 pray01, pcf
alpha chatt01 relguide01 pray01

***************************************************************************************
***************************************************************************************
***********************STEP 5: ANALYSES IN APPENDIX************************************
***************************************************************************************
***************************************************************************************

use "/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB Replication/Castle Stepp PB Replication.dta"
svyset [pweight= weight2] 

*Appendix C: Sample Demographics Before & After Weighting
tab party01
tab ideo01
tab female01
tab race5weight
tab reltrad5
tab income01
tab educ5weight

svy: tab party01
svy: tab ideo01
svy: tab female01
svy: tab race5weight
svy: tab reltrad5
svy: tab income01
svy: tab educ5weight

********************************************************************************************
*Appendix D, Figure D1: Party's Impact on Issue Polarization (no Controls), Cultural Issues*
********************************************************************************************

use "/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB Replication/Castle Stepp PB 2021 Appendix D1 D2 mini dataset.dta"

*label define pid6lab 0 "Str. Rep." 1 "Rep." 2 "Ind. Rep." 3 "Ind." 4 "Ind. Dem" 5 "Dem." 6 "Str. Dem."
*label values party pid6lab

twoway (dot abort party, horizontal) (rcap abort_lb abort_ub party, horizontal), scheme(s1mono) title("Abortion") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App1)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot gaymarry party, horizontal) (rcap gay_lb gay_ub party, horizontal), scheme(s1mono) title("Same-sex Marriage") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App2)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot intel party, horizontal) (rcap intel_lb intel_ub party, horizontal), scheme(s1mono) title("Intelligent Design") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App3)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot tencomm party, horizontal) (rcap ten_lb ten_ub party, horizontal), scheme(s1mono) title("Ten Commandments") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App4)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot transbr party, horizontal) (rcap trans_lb trans_ub party, horizontal), scheme(s1mono) title("Anti-Trans. Bathroom Bills") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App5)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

graph combine App1 App2 App3 App4 App5, ycommon

************************************************************************************************
*Appendix D, Figure D2: Party's Impact on Issue Polarization (no Controls), Non-cultural Issues*
************************************************************************************************

use "/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB Replication/Castle Stepp PB 2021 Appendix D1 D2 mini dataset.dta"

twoway (dot welfare party, horizontal) (rcap wel_lb wel_ub party, horizontal), scheme(s1mono) title("Welfare") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App6)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot enviro party, horizontal) (rcap envi_lb envi_ub party, horizontal), scheme(s1mono) title("Environment") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App7)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot immig party, horizontal) (rcap immig_lb immig_ub party, horizontal), scheme(s1mono) title("Immigration") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App8)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot health party, horizontal) (rcap health_lb health_ub party, horizontal), scheme(s1mono) title("Healthcare") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App9)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot military party, horizontal) (rcap mil_lb mil_ub party, horizontal), scheme(s1mono) title("Military Size") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App10)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

graph combine App6 App7 App8 App9 App10, ycommon

**********************************************************************************************************
*Appendix D, Figure D3: Religious Tradition's Impact on Issue Polarization (no Controls), Cultural Issues*
**********************************************************************************************************

use "/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB Replication/Castle Stepp PB 2021 Appendix D3 D4 mini dataset.dta"

*label define rel5lab5 0 "Unaffiliated" 1 "Catholic" 2 "Black Prot." 3 "Mainline" 4 "Evangelical"
*label values reltrad rel5lab5

twoway (dot abort reltrad, horizontal) (rcap abort_lb abort_ub reltrad, horizontal), scheme(s1mono) title("Abortion") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App11)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot gaymarry reltrad, horizontal) (rcap gay_lb gay_ub reltrad, horizontal), scheme(s1mono) title("Same-sex Marriage") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App12)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot intel reltrad, horizontal) (rcap intel_lb intel_ub reltrad, horizontal), scheme(s1mono) title("Intelligent Design") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App13)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot tencomm reltrad, horizontal) (rcap ten_lb ten_ub reltrad, horizontal), scheme(s1mono) title("Ten Commandments") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App14)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot transbr reltrad, horizontal) (rcap trans_lb trans_ub reltrad, horizontal), scheme(s1mono) title("Anti-Trans. Bathroom Bills") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App15)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

graph combine App11 App12 App13 App14 App15, ycommon

**************************************************************************************************************
*Appendix D, Figure D4: Religious Tradition's Impact on Issue Polarization (no Controls), Non-cultural Issues*
**************************************************************************************************************

use "/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB Replication/Castle Stepp PB 2021 Appendix D3 D4 mini dataset.dta"

twoway (dot welfare reltrad, horizontal) (rcap wel_lb wel_ub reltrad, horizontal), scheme(s1mono) title("Welfare") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App16)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot enviro reltrad, horizontal) (rcap envi_lb envi_ub reltrad, horizontal), scheme(s1mono) title("Environment") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App17)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot immig reltrad, horizontal) (rcap immig_lb immig_ub reltrad, horizontal), scheme(s1mono) title("Immigration") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App18)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot health reltrad, horizontal) (rcap health_lb health_ub reltrad, horizontal), scheme(s1mono) title("Healthcare") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App19)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot military reltrad, horizontal) (rcap mil_lb mil_ub reltrad, horizontal), scheme(s1mono) title("Military Size") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App20)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

graph combine App16 App17 App18 App19 App20, ycommon

***********************************************************************************************************
*Appendix D, Figure D5: Religious Commitment's Impact on Issue Polarization (no Controls), Cultural Issues*
***********************************************************************************************************

use "/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB Replication/Castle Stepp PB 2021 Appendix D5 D6 mini dataset.dta"

twoway (dot abort relcommit, horizontal) (rcap abort_lb abort_ub relcommit, horizontal), scheme(s1mono) title("Abortion") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App21)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot gaymarry relcommit, horizontal) (rcap gay_lb gay_ub relcommit, horizontal), scheme(s1mono) title("Same-sex Marriage") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App22)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot intel relcommit, horizontal) (rcap intel_lb intel_ub relcommit, horizontal), scheme(s1mono) title("Intelligent Design") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App23)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot tencomm relcommit, horizontal) (rcap ten_lb ten_ub relcommit, horizontal), scheme(s1mono) title("Ten Commandments") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App24)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot transbr relcommit, horizontal) (rcap trans_lb trans_ub relcommit, horizontal), scheme(s1mono) title("Anti-Trans. Bathroom Bills") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App25)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

graph combine App21 App22 App23 App24 App25, ycommon

***************************************************************************************************************
*Appendix D, Figure D6: Religious Commitment's Impact on Issue Polarization (no Controls), Non-cultural Issues*
***************************************************************************************************************

use "/Users/jeremycastle/Desktop/PB Final Submission/Castle Stepp PB Replication/Castle Stepp PB 2021 Appendix D5 D6 mini dataset.dta"

twoway (dot welfare relcommit, horizontal) (rcap wel_lb wel_ub relcommit, horizontal), scheme(s1mono) title("Welfare") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App26)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot enviro relcommit, horizontal) (rcap envi_lb envi_ub relcommit, horizontal), scheme(s1mono) title("Environment") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App27)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot immig relcommit, horizontal) (rcap immig_lb immig_ub relcommit, horizontal), scheme(s1mono) title("Immigration") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App28)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot health relcommit, horizontal) (rcap health_lb health_ub relcommit, horizontal), scheme(s1mono) title("Healthcare") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App29)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

twoway (dot military relcommit, horizontal) (rcap mil_lb mil_ub relcommit, horizontal), scheme(s1mono) title("Military Size") ytitle("") ylabel(, angle(0) valuelabels) xlabel(-3(1)3) xtitle(<-Liberal     Conservative->) legend(off) name(App30)
graph play Relcommit dots
graph play Relcommit dots large thick CIs

graph combine App26 App27 App28 App29 App30, ycommon
